#pragma once
#include "TypeDefs.h"
#include <boost/shared_ptr.hpp>
class ModelVBO
{
public:
	ModelVBO();
	~ModelVBO();
	bool Create(const vector3 *pVertexData, const vector3 *pNormalData, const vector2 *pTexCoordData, uint count);
	void SetCustomPointers(int vertexPointer, int normalPointer, int texPointer);
	void Destroy();
	bool IsValid();
	void Bind();
	void CustomBind();
	void Unbind();
	void CustomUnbind();
	uint GetElementCount() { return m_nElementCount; };
private:
	int in_vertexPointer;
	int in_normalPointer;
	int in_texPointer;
	boost::shared_ptr<int> m_validator;
	uint m_nVertexBufferObject;
	bool m_bHasNormal;
	bool m_bHasTexCoord;
	void *m_vertPointer;
	void *m_normPointer;
	void *m_texPointer;
	uint m_nElementCount;
};